// UITest.cpp : main source file for UITest.exe
//

#include "stdafx.h"
#include "SkinApp.h"
#include "UdtEnginer.h"
#include "ContainerMyGame.h"
#pragma comment(lib,"Winmm.lib")

CAppModule _Module;

int WINAPI _tWinMain( HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow )
{

    int nRet = 0;

    const TCHAR* lpszXML = _T( "G:\\Project\\CodeLib\\bin\\Layout.xml" );

    CSkinApp* pSkinApp = AfxGetApp();

//    pSkinApp->SetUdtObjEnginer(new CUdtEnginer());

//    if (pSkinApp->LoadSkinFile(lpszXML))
    {
        CContainerMyGame mainDlg;

        if ( !mainDlg.LoadXml( lpszXML ) )
        {
            return -1;
        }

        if ( NULL == mainDlg.Create() )
        {
            return -2;
        }

//        mainDlg.CenterWindow();
        mainDlg.ShowWindow( nCmdShow );

        mainDlg.UpdateWindow();
        nRet = pSkinApp->Run( lpstrCmdLine, nCmdShow );
    }

    pSkinApp->Release();

    return nRet;
}
